package org.lh.ibernate.utils;

import org.lh.ibernate.core.tools.ParameterLink;

import java.lang.reflect.Type;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

public interface IDbUtil {

    /*
     * @author: idea
     * @Date: 9:34 2018/7/18
     * @version: 1.0
     * @return: executeUpdate
     * @Params: String sql, List<Object> paramsList
     * @des: 用于处理插入，删除，更新
     */
    void executeUpdate(String sql, List<Object> paramsList) throws Exception;


    /*
     * @author: idea
     * @Date: 9:34 2018/7/18
     * @version: 1.0
     * @return: ResultSet
     * @Params: String sql, ParameterLink parameterLink
     * @des: 用于处理复杂查询
     */
    ResultSet query(String sql, ParameterLink parameterLink) throws Exception;


    /*
     * @author: idea
     * @Date: 9:34 2018/7/18
     * @version: 1.0
     * @return: ResultSet
     * @Params: String sql
     * @des: 用于处理单个查询
     */
    ResultSet query(String sql) throws Exception;



    /*
     * @author: idea
     * @Date: 9:34 2018/7/18
     * @version: 1.0
     * @return: CallableStatement
     * @Params: String sql,List<Object> paramsList,int itemSize,int times
     * @des: 用于处理批量插入
     */
    void batchInsert(String sql,List<Object> paramsList,int itemSize,int times) throws Exception;




    /*
     * @author: idea
     * @Date: 9:34 2018/7/18
     * @version: 1.0
     * @return: CallableStatement
     * @Params: String callSql
     * @des: 用于处理查询的存储过程的接口
     */
    ResultSet queryCallHandle(String callSql) throws Exception;



}
